Internet services belong to services involving massive requests, and when Internet services are provided, some basic data always needs to be acquired by various types of services. At present, basic data is usually stored in a basic data query server, and service servers acquire the basic data from the basic data query server in a query manner of using a User Datagram Protocol (UDP) packet. There are two aspects of defects for this manner: in one aspect, the number of query requests that are sent to the basic data query server for querying basic data is huge, and therefore it is a processing bottleneck for the basic data query server to process the query requests; and in another aspect, the query manner of using a UDP packet occupies service processing time, and timeout of processing of query requests by the basic data query server causes timeout of service processing, which increases coupling of service processing to external services, and reduces controllability of service processing.
To solve the defects of the two aspects, at present, a technical solution of agent query are usually used to acquire this type of basic data. The technical solution of agent query mainly includes that: An agent for basic data is installed on each service server, the Agent acquires periodically update of basic data at a basic data entry end (the entry end is also referred to as a data-writing end where the basic data is stored, such as a primary site of Internet services), and stores the acquired basic data at the service server locally, and when the service server needs to query the basic data, a local application programming interface (API) is called to query the basic data. In this technical solution of agent query, a huge quantity of read requests for the basic data query server from the service server are eliminated, and instead, synchronization operation of a small quantity of write requests at an entry end are required, which solves the problem of bottleneck of massive query requests read requests) for the basic data query server. And meanwhile, the service server acquires basic data by locally calling an API, and performance of a local interface is very high, which almost does not occupy service processing time, thereby reducing impacts on the service processing efficiency.
For a data synchronization mechanism between the agent on the service processor and the basic data entry end which is shortly referred to as a data entry end in this specification), timing synchronization is commonly used at present, that is, an Agent (destination end) may pull data from a source end (data-writing end) periodically to achieve synchronization of data. For example, crontab command may be performed periodically to pull data. Data may be pulled for example, through the File Transfer Protocol (FTP), the Hypertext transfer protocol (HTTP), or the like.
However, the foregoing periodic synchronization has poor real-time performance. If the duration for the synchronization is shortened to increase real-time performance, a huge quantity of synchronized data is synchronized again in each synchronization process, causing waste of the network bandwidth.